{% extends "layout.html" %}
{% block css %}
<link rel="stylesheet" href="{{url_for('static', filename='css/activate_email.css')}}">
{% endblock %}
{% block content %}
    <div class="content row justify-content-center">
        {% if user %}
            <div class="col-sm-6">
                <h4 class="text-success">激活成功</h4>
                <p><span id="time"></span>秒后自动跳到首页.....</p>
                <script>
                    var time = document.getElementById("time");
                    time.innerHTML = 3;

                    var timer = setInterval(function(){
                        time.innerHTML -= 1;
                        if(time.innerHTML <= 0){
                            clearInterval(timer);
                            window.location.href = "/";
                        };
                    }, 1000)
                </script>
            </div>
        {% else %}
            <div class="col-sm-6">
                <h4 class="text-danger">激活失败</h4>
                <p>认证错误或认证已过期......</p>
            </div>
        {% endif %}
    </div>
{% endblock %}